<template>
	<view>
		<view v-for="item in category" :key="item._id">{{item.name}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				category: [],
				currentClick: 0
			}
		},
		methods: {
			getAllMovie() {
				uni.request({
					url: 'http://47.98.128.191:3003/tags/getTags',
					success: ({
						data
					}) => {
						this.category = data.result;
						// console.log(this.category)
					}
				})
			},
			getClickCat(id) {
				console.log(id);
			}
		},
		onLoad() {
			// this.getAllMovie()
		}
	}
</script>

<style scoped>
	.category-container {
		display: flex;

	}

	.category-left {
		width: 200rpx;
		height: 100vh;
		text-align: center;
		line-height: 100rpx;
		background-color: #f5f5f5;
		font-size: 28rpx;
	}

	.category-right {
		flex: 1;
		width: 550rpx;
		height: 100vh;
	}

	.active {
		border-left: 10rpx solid yellow;
		background-color: white;
	}

	.category-right-box {
		display: flex;
		flex-wrap: wrap;
	}

	.childrenItem-title {
		text-align: center;
		margin: 40rpx 0;
		font-size: 28rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.childrenItem-title-img {
		width: 30rpx;
		height: 30rpx;
		margin-right: 9rpx;
	}

	.childrenItem-cat {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 33%;
		flex-grow: 0;
		margin-bottom: 20rpx;
		font-size: 22rpx;
		color: #a7a4a4;
	}

	.childrenItem-cat-img {
		width: 115rpx;
		height: 125rpx;
	}
</style>
